From 19d147c0a3b2750ca25c47d98579364a2c18da55 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Thu, 6 Nov 2008 22:09:28 +0000 Subject: [PATCH] Update on r43103. Add the 'norollbackdiff' toggle to 'misc', not to 'edit' per suggestion by Aaron. --- includes/specials/SpecialPreferences.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 6f88b8b791..bec21cd115 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -1004,9 +1004,6 @@ class PreferencesForm { 'forceeditsummary', ) ) ); - if( $wgUser->isAllowed( 'rollback' ) ) - $wgOut->addHtml( $this->getToggle( 'norollbackdiff' ) ); - $wgOut->addHtml( '' ); # Recent changes @@ -1118,9 +1115,13 @@ class PreferencesForm { foreach ( $togs as $tname ) { if( !array_key_exists( $tname, $this->mUsedToggles ) ) { - $wgOut->addHTML( $this->getToggle( $tname ) ); + if( $tname == 'norollbackdiff' && $wgUser->isAllowed( 'rollback' ) ) + $wgOut->addHTML( $this->getToggle( $tname ) ); + else + $wgOut->addHTML( $this->getToggle( $tname ) ); } } + $wgOut->addHTML( '' ); wfRunHooks( 'RenderPreferencesForm', array( $this, $wgOut ) ); -- 2.20.1